//
// Created by hkkzzxz on 24-9-1.
//

#ifndef YUNSHI_REDISDATABASEMODEL_H
#define YUNSHI_REDISDATABASEMODEL_H

// Redis数据库CRUD

#include "LogManager.h"

class RedisDatabaseModel {
public:
    // 新增键值对
    bool set(const std::string &key, const std::string &value);

    // 获取键值对
    std::string get(const std::string &key);

    // 删除键值对
    bool del(const std::string &key);

    // 判断键值对是否存在
    bool exists(const std::string &key);

private:
    LogManager *logManager = LogManager::getInstance();
    std::shared_ptr<spdlog::logger> consoleLogger = logManager->getConsoleLogger();
    std::shared_ptr<spdlog::logger> fileLogger = logManager->getFileLogger();
};


#endif //YUNSHI_REDISDATABASEMODEL_H
